 <template>

<el-container>
     <el-header style="font-size: 18px">
    <span>博客页面</span>
      <div>
          <el-dropdown>
        <i class="el-icon-setting" style="margin-right: 15px"></i>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item><el-button @click="signin">登录</el-button></el-dropdown-item>
          <el-dropdown-item><el-button @click="signup">注册</el-button></el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      
      <span>王小虎</span>
      </div>
    </el-header>
<el-main>
    <el-table
    :data="formDate"
    height=1000px
    style="width: 100%">
    <el-table-column
      prop="a_title"
      label="文章标题"
      width="180">
    </el-table-column>
    
    <el-table-column
      label="摘要"
      >
      <template slot-scope="scope">
        <i class="el-icon-time"></i>
        <span style="margin-left: 10px">{{ scope.row.a_content }}</span>
      </template>
    </el-table-column>
     <el-table-column
      label="日期"
      >
      <template slot-scope="scope">
   
        <span style="margin-left: 10px">{{ scope.row.a_createat | moment}}</span>
      </template>
    </el-table-column>
    
  </el-table>

    
    </el-main>
    
</el-container>
     
  
  
</template>
      
    


<script>
export default {
    name:"AddUser",
    data(){
        return{
            formDate:[]
        }
    },
     created(){
        this.getUserinfo()
    },
    methods:{
        getUserinfo(){
            this.$axios.get("/art/all").then(res=>{
                this.formDate = res.data
               
            })
        },
        signin(){
            this.$router.push("/signin")
        },
        signup(){
            this.$router.push("/signup")

        }
    }
};
</script>

<style scoped>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
    color: #fff;
  }
  .el-header{
      display: flex;
      justify-content: space-between;
      
  }
  .el-button{
      border: none;
  }
 
</style>